package L1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class _059 {
    /**
     * 敲笨钟
     */
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.valueOf(reader.readLine());
        for (int i=0;i<N;i++){
            String[] split = reader.readLine().split(",");
            String[] s1 = split[0].split(" ");
            String[] s2 = split[1].split(" ");
            if (s1[s1.length-1].contains("ong")&&s2[s2.length-1].contains("ong")){
                String[] s = split[1].split(" ");
                System.out.print(split[0]+", ");
                if (s.length<=3){
                    System.out.println("qiao ben zhong.");
                }else {
                    for (int j=0;j<s.length-3;j++){
                        System.out.print(s[j]+" ");
                    }
                    System.out.println("qiao ben zhong.");
                }
            }else
                System.out.println("Skipped");
        }
    }
}
